package com.dtx.practice.one;

public class CompareReference {
    public static void main(String[] args) {
        float f = 42.0f;
        float f1[] = new float[2];
        float f2[] = new float[2];
        float f3[] = f1;
        long x = 42;
        f1[0] = 42.0f;

        System.out.println(f1 == f2);  //false
        System.out.println(x == f1[0]);  //true
        System.out.println(f1 == f3);   //true
        //System.out.println(f2 == f1[1]); 直接报错
    }
}
